* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Arial', sans-serif;
    background-color: #111827;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(53, 111, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(120, 41, 255, 0.1) 0%, transparent 50%);
    color: #edf2f7;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    background-color: rgba(17, 24, 39, 0.8);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.3),
                0 0 5px rgba(99, 102, 241, 0.2) inset;
    backdrop-filter: blur(10px);
    padding: 25px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

h1 {
    color: #edf2f7;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(31, 41, 55, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
}

.player {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-name {
    font-size: 18px;
    margin-bottom: 5px;
    color: rgba(219, 234, 254, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-score {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.timer {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    padding: 8px 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
}

.game-board-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.game-board {
    flex: 1;
    height: 500px;
    background-color: rgba(31, 41, 55, 0.5);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3) inset;
}

.player1-board {
    border: 2px solid rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.player2-board {
    border: 2px solid rgba(239, 68, 68, 0.7);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

button {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    transition: all 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4),
                0 0 5px rgba(99, 102, 241, 0.2) inset;
}

button:hover {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6),
                0 0 5px rgba(99, 102, 241, 0.2) inset;
}

#restart-button {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4),
                0 0 5px rgba(239, 68, 68, 0.2) inset;
}

#restart-button:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6),
                0 0 5px rgba(239, 68, 68, 0.2) inset;
}

.block {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                opacity 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 70%);
    border-radius: 5px;
    pointer-events: none;
}

.block:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.block-1 { 
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); 
    border-color: rgba(59, 130, 246, 0.5);
}
.block-2 { 
    background: linear-gradient(135deg, #ef4444, #b91c1c); 
    border-color: rgba(239, 68, 68, 0.5);
}
.block-3 { 
    background: linear-gradient(135deg, #10b981, #047857); 
    border-color: rgba(16, 185, 129, 0.5);
}
.block-4 { 
    background: linear-gradient(135deg, #f59e0b, #b45309); 
    border-color: rgba(245, 158, 11, 0.5);
}
.block-5 { 
    background: linear-gradient(135deg, #8b5cf6, #6d28d9); 
    border-color: rgba(139, 92, 246, 0.5);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: rgba(31, 41, 55, 0.95);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.4),
                0 0 10px rgba(99, 102, 241, 0.2) inset;
}

#winner-text {
    margin-bottom: 20px;
    color: #edf2f7;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

#final-score {
    font-size: 20px;
    margin-bottom: 25px;
    color: rgba(219, 234, 254, 0.9);
}

#play-again {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4),
                0 0 5px rgba(16, 185, 129, 0.2) inset;
    font-size: 18px;
}

#play-again:hover {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6),
                0 0 5px rgba(16, 185, 129, 0.2) inset;
}

/* 特效相关样式 */
.match-effect {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0.8;
    animation: pulse 0.5s ease-out forwards;
}

@keyframes pulse {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.block-glow {
    filter: brightness(1.5) drop-shadow(0 0 10px currentColor);
    animation: glow 0.5s ease-in-out;
}

@keyframes glow {
    0% { filter: brightness(1) drop-shadow(0 0 0px currentColor); }
    50% { filter: brightness(1.8) drop-shadow(0 0 15px currentColor); }
    100% { filter: brightness(1) drop-shadow(0 0 0px currentColor); }
}

.block-explode {
    animation: explode 0.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.score-pop {
    position: absolute;
    color: white;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
    z-index: 30;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    animation: scorePop 1s ease-out forwards;
}

@keyframes scorePop {
    0% {
        transform: scale(0.5) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) translateY(-50px);
        opacity: 0;
    }
}

.instructions {
    text-align: center;
    color: rgba(219, 234, 254, 0.7);
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(31, 41, 55, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.instructions p {
    letter-spacing: 1px;
}

.control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.player-controls {
    display: flex;
    gap: 10px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.move-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #edf2f7;
    width: 60px;
    height: 50px;
    font-size: 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.player1-controls .move-button {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.player2-controls .move-button {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.move-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.move-button:active {
    transform: translateY(1px);
    background: rgba(255, 255, 255, 0.3);
} 